package com.fieldchain.ex.fa100.mvp.presenter;

import android.graphics.Bitmap;

import com.fieldchain.ex.fa100.inter.ImageCallBack;
import com.fieldchain.ex.fa100.inter.IntegerCallBack;
import com.fieldchain.ex.fa100.mvp.base.MyBasePresenter;
import com.fieldchain.ex.fa100.mvp.model.ForgetModle;
import com.fieldchain.ex.fa100.mvp.view.ForgetView;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/11
 */
public class ForgetPresenter extends MyBasePresenter<ForgetModle, ForgetView> {
    public void getVer() {
        model.getVer(new ImageCallBack() {
            @Override
            public void imageReceive(Bitmap bit) {
                view.verImage(bit);
            }
        });
    }

    public void forget(String smsCode, String userName){
        model.forget(smsCode, userName, new IntegerCallBack() {
            @Override
            public void index(int status) {
                view.forgetResult(status);
            }
        });
    }
    public void forget(String password,String smsCode, String userName){
        model.forget(password,smsCode, userName, new IntegerCallBack() {
            @Override
            public void index(int status) {
                view.forgetResult(status);
            }
        });
    }

}
